package com.xhh.hybriddemo.ui.fragment;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.xhh.hybriddemo.R;
import com.xhh.hybriddemo.base.BaseFragment;
import com.xhh.hybriddemo.ui.adapter.UserAdapter;

import butterknife.BindView;


/**
 * 个人中心
 * Created by haoji on 2017/12/26.
 */

public class UserFragment extends BaseFragment {

    @BindView(R.id.user_recyclerview)
    RecyclerView mRecyclerView;
    @BindView(R.id.tv_common_title)
    TextView tvCommonTitle;
    @Override
    protected void init(View rootView) {
        initView();
        LinearLayoutManager manager = new LinearLayoutManager(getActivity());
        mRecyclerView.setLayoutManager(manager);
        UserAdapter mAdapter = new UserAdapter(getActivity());
        mRecyclerView.setAdapter(mAdapter);
    }

    private void initView() {
        tvCommonTitle.setText("我的");
    }

    @Override
    protected int getContentViewId() {
        return R.layout.fragment_user;
    }
}
